package com.example.shop.utils;

public class BaseContext {
    private static ThreadLocal<Object> threadLocal=new ThreadLocal<Object>();
    /**
     * 保存当前用户id
     */
    public static void setAccountId(Object id){
        threadLocal.set(id);
    }
    /**
     * 获取当前用户id
     */
    public static Object getAccountId(){
        return threadLocal.get();
    }
    /**
     * 保存当前用户iphone
     */
    public static void setIphoneNum(Object iphone){
        threadLocal.set(iphone);
    }
    /**
     * 获取当前用户iphone
     */
    public static Object getIphoneNum(){
        return threadLocal.get();
    }

}
